package thread.anonymous;

public class Demo01Anonymous {
    public static void main(String[] args) {
        new Thread() {
            @Override
            public void run() {
                System.out.println("这是一个线程:" + Thread.currentThread().getName());
            }
        }.start();

        new Thread(() -> System.out.println("这是一个线程:" + Thread.currentThread().getName())).start();
        


        Runnable runnable = () -> {
            System.out.println("你好");
        };

        new Thread(runnable).start();
    }
}
